// 放大镜效果
var top_right = document.querySelector('.top_right');
//   获取到input
var top_right_inp = top_right.querySelector('input');
//获取放大镜
var glass = top_right.querySelector('.a5');

// 鼠标移入移出
glass.addEventListener('mouseover', function() {
    top_right_inp.style.borderColor = '#e6e6e6';
    top_right_inp.style.width = 128 + 'px';
    top_right_inp.focus();

})
top_right_inp.addEventListener('blur', function() {
    top_right_inp.style.borderColor = 'transparent';
    top_right_inp.style.width = 0 + 'px';

})



// 移动学习
//  获取移动学习li
var learn = document.querySelector('.head_nav li:nth-child(6)');
//  获取二维码模块
var li_code = learn.querySelector('.li_code')

learn.addEventListener('mouseover', function() {
    li_code.style.height = 160 + 'px'
    li_code.style.paddingTop = 35 + 'px'

})
learn.addEventListener('mouseout', function() {
    li_code.style.height = 0 + 'px'
    li_code.style.paddingTop = 0 + 'px'
})





function fn() {
    var em_pic = document.querySelector('.top_right em');
    var a3 = document.querySelector('.a3');
    var a4 = document.querySelector('.a4');
    var loc = localStorage.getItem('phone');
    if (loc) {
        a3.style.display = 'none';
        a4.style.display = 'none';
        em_pic.style.display = 'block';
    }

    em_pic.onclick = function() {
        var r = confirm('是否退出：')
        if (r) {
            a3.style.display = 'block';
            a4.style.display = 'block';
            em_pic.style.display = 'none';
            localStorage.removeItem('phone');
        }
    }
}

fn();